<?php
/** Zend_Test_PHPUnit_ControllerTestCase */
require_once 'Zend/Test/PHPUnit/ControllerTestCase.php';

/** Zend_Application */
require_once 'Zend/Application.php';

/**
 * Functional testing scaffold for MVC applications
 *
 * @category    IPB_CMS
 * @package     App_Test
 * @subpackage  PHPUnit
 * @copyright   Copyright (c) 2009 IPB CMS <http://ipb-cms.googlecode.com/>
 * @license     http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License
 * @author      Henrique Moody <henriquemoody@gmail.com>
 */
abstract class App_Test_PHPUnit_ControllerTestCase extends Zend_Test_PHPUnit_ControllerTestCase
{
    /**
     * Application
     *
     * @var Zend_Application
     */
    protected $application;

    /**
     * Set up MVC application
     *
     * @return void
     */
    public function setUp()
    {
        $this->application = new Zend_Application(
            APPLICATION_ENV,
            APPLICATION_PATH . '/configs/application.ini'
        );
        $this->bootstrap = array($this, 'appBootstrap');
        parent::setUp();
    }

    /**
     * Bootstrap
     *
     * @return void
     */
    public function appBootstrap()
    {
        $this->application->bootstrap();
    }

}
